package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.service.CategoryService3;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "获取类别子树")
public class CategoryController3 {

    @Autowired
    CategoryService3 categoryService;
    @GetMapping("/getCategoryList")

    @ApiOperation("类别列表")
    public ResultBean getCategory(@RequestParam int id){
        List list=categoryService.getCategory(id);
        return R.success("类别列表",list);
    }
}
